<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Find using table... (command Search/Find using table...)</title>
<link rel="STYLESHEET" href="../system/default_style.css" type="text/css">
</head>

<body bgcolor="#FFFFFF">

<p><div class="Title">Find using table... (command Search/Find using table...)</div><br>
<br>
Translhextion can use standard <a href="../02/02-Thingy_Tables.htm">Thingy Tables</A> to find encoded text
in a file. In the dialog you can choose whether you want to
&quot;Optimize&quot; the bytes of the find string (see below) and
you can select the search direction.<br>
<br>
NOTE: Because of the nature of <a href="../02/02-Thingy_Tables.htm">Thingy Tables</A>, all searches using
tables are <b>CASE SENSITIVE</b>.<br>
<br>
What is the difference between enabling and disabling &quot;Optimize
bytes&quot;?<br>
<br>
The answer to this question requires a good understanding of
<a href="../02/02-Thingy_Tables.htm">Thingy tables</A> and <a href="../02/02-DTE.html">DTE (Dual Tile Encoding)</A>. You may also want to
read about <a href="../02/02-MTE.html">MTE (Multiple Tile Encoding)</A>. The answer, in short, is
as follows:<br>
<br>
NOTE: In the following explanation, where braces ' { ' and ' } '
are used they represent the default value of the separated-byte
<b>left enclosure</b> &amp; <b>right enclosure</b> characters which can be
specified in Options/Preferences... You must use the characters
specified in this setting while using any table-related command!<br>
<br>
<b>&quot;Optimize bytes&quot; disabled:</b><br>
<br>
The search string is parsed through the Thingy table with each
byte translated literally. Each character literal is translated
into its equivalent character literal in the table without
considering DTE, MTE, or multi-byte values and each byte literal
of the form {XX} is translated into it's equivalent multi-character-byte
literal using DTE and MTE. <br>
<br>
Example:<br>
<br>
If I want to search for &quot;Crystal&quot; in Final Fantasy 2 (US),
it happens to be encoded in two forms, the first with all
character literals (7-bytes) and the second using DTE (4-bytes).
As you can see, byte-literals must be used to find the DTE
version of &quot;Crystal&quot;.<br>
<br>

<table>

<tr>
       <td class="top">FIND STRING</td>
       <td class="top">STRING FOUND</td>
       <td class="top">BYTES</td>
</tr>
<tr>
       <td>Crystal</td>
       <td>"Crystal"</td>
       <td><b>7-bytes</b></td>
</tr>
<tr>
       <td>C{ry}{st}{al}</td>
       <td>"Crystal"</td>
       <td>4-bytes</td>
</tr>
</table>

<br>
If, however, I want to search for &quot;Crew&quot; instead, it
cannot be found using this setting without typing in byte-literals
because the only encoding of it uses DTE (3-bytes).<br>
<br>
<table>

<tr>
       <td class="top">FIND STRING</td>
       <td class="top">STRING FOUND</td>
       <td class="top">BYTES</td>
</tr>
<tr>
       <td>Crew</td>
       <td>N/A</td>
       <td>0-bytes</td>
</tr>
<tr>
       <td>C{re}w</td>
       <td>&quot;Crew&quot;</td>
       <td>3-bytes</td>
</tr>
</table>
<BR>
Finally, if I want to find an MTE value such as &quot;Cecil&quot;
I MUST enter the byte-literal to find it.<br>
<br>
<table>
<tr>
       <td class="top">FIND STRING</td>
       <td class="top">STRING FOUND</td>
       <td class="top">BYTES</td>
</tr>
<tr>
       <td>Cecil</td>
       <td>N/A</td>
       <td>0-bytes</td>
</tr>
<tr>
       <td>{Cecil}</td>
       <td>&quot;Cecil&quot;</td>
       <td><b>2-bytes</b></td>
</tr>
</table>
<br>
<b>&quot;Optimize bytes&quot; enabled:</b><br>
<br>
The search string is parsed through the Thingy table and DTE, MTE,
&amp; multi-byte replacements are made where possible. DTE, MTE,
&amp; multi-byte byte-literals CAN still be used if desired. <br>
<br>
Example:<br>
<br>
If I want to search for &quot;Crystal&quot; in Final Fantasy 2 (US),
it happens to be encoded in two forms, the first with all
character literals (7-bytes) and the second using DTE (4-bytes).
In this case, the DTE version is found with or without typing in
byte-literals. <br><BR>
<table>
<tr>
       <td class="top">FIND STRING</td>
       <td class="top">STRING FOUND</td>
       <td class="top">BYTES</td>
</tr>
<tr>
       <td>Crystal</td>
       <td>&quot;Crystal&quot;</td>
       <td><b>4-bytes</b></td>
</tr>
<tr>
       <td>C{ry}{st}{al}</td>
       <td>&quot;Crystal&quot;</td>
       <td>4-bytes</td>
</tr>
</table>

<br>
*<b>NOTE</b>: This setting CANNOT be used to find the 7-byte version of
&quot;Crystal&quot; at all which is why the other setting is
available.<br>
<br>
If, however, I want to search for &quot;Crew&quot; (DTE, 3-bytes)
instead, it be found with or without typing in byte-literals
using this setting.<br><BR>
<table>
<tr>
       <td class="top">FIND STRING</td>
       <td class="top">STRING FOUND</td>
       <td class="top">BYTES</td>
</tr>
<tr>
       <td>Crew</td>
       <td>&quot;Crew&quot;</td>
       <td>3-bytes</td>
</tr>
<tr>
       <td>C{re}w</td>
       <td>&quot;Crew&quot;</td>
       <td>3-bytes</td>
</tr>
</table>
<BR>
Finally, if I want to find an MTE value such as &quot;Cecil&quot;
I can enter the byte-literal to find it or I can just search for
the string itself.<br>
<table>
<tr>
       <td class="top">FIND STRING</td>
       <td class="top">STRING FOUND</td>
       <td class="top">BYTES</td>
</tr>
<tr>
       <td>Cecil</td>
       <td>&quot;Cecil&quot;</td>
       <td>2-bytes</td>
</tr>
<tr>
       <td>{Cecil}</td>
       <td>&quot;Cecil&quot;</td>
       <td><b>2-bytes</b></td>
</tr>
</table>
<br>
<br>
The reason &quot;Optimize bytes&quot; is recommended is because *MOST*
game data is usually optimized using DTE, MTE, &amp; multi-byte
values if they are present at all. This means that most of the
time you are looking for a string that is fewer bytes than the
number of characters you typed. The only time this setting isn't
useful is when the string you are searching for COULD have used
DTE, MTE, or a multi-byte value but didn't.</p>
</body>
</html>
